// pages/index/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    menu: [
      {
        name: '扫码',
        imgSrc: './../../assets/icon/scan.png',
        url: '../scan/index'
      },
      {
        name: '生成二维码',
        imgSrc: './../../assets/menu/make.png',
        url: '../create/index'
      },
      {
        name: '滚动字幕',
        imgSrc: './../../assets/menu/captions.png',
        url: '../captions/index/index'
      },
      {
        name: '关于',
        imgSrc: './../../assets/menu/readme.png',
        url: '../readme/index'
      },
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  // 点击菜单
  menuClick(e) {
    wx.navigateTo({
      url: e.currentTarget.dataset.url
    })
  }

})
